<include file="Index:header" />
<style>
	.avatar {
		width:40px;
		height:40px;
	}
</style>
<div id="content" class="container_16 clearfix">
	<div class="btn-toolbar">
		<a href="{:U('Admin/Member/index')}" class="btn btn-primary">视频管理</a>
	</div>	
	<br />
	<div class="well">
	
		<form action="{:U('Admin/News/index')}" class="bs-docs-example form-search">

			<div class="input-prepend">
				<span class="add-on"><i class="icon-search"></i></span> <input
					type="text" name="keyword" class="search">
			</div>
			<input type="submit" value="搜索" class="btn"/>
			<input type="hidden" name="a" value="{$Think.const.ACTION_NAME}" />
			<input type="hidden" name="m" value="{$Think.const.MODULE_NAME}" />
			<input type="hidden" name="g" value="{$Think.const.GROUP_NAME}" /> 
		</form>
		
		<table class="table">
			<thead>
				<tr>
					<th>选择</th>
					<th>视频标题</th>
					<th>播放地址</th>
					<th>视频描述</th>
					<th>操作</th>
				</tr>
			</thead>

			<tbody>
			
				<volist name="videos" id="video">
					<tr>
						<td><input type="checkbox" name="id[]" value="{$new.id}" /></td>
						<td>{$video.title}</td>
						<td>{$video.play_url}</td>
						<td>{$video.description}</td>
						<td>
							<a href="{:U('Admin/Member/edit',array('id'=>$member['uid']))}" class="edit">编辑</a>|&nbsp;
							<if condition="$video.publish eq '1'">
								<a href="#">已发布</a>|&nbsp;
							<else />
								<a href="#">发布</a>|&nbsp;
							</if>
							
							<if condition="$video.recommend eq '1'">
								<a href="#" ctype="ajaxmod" acturl="{:U('Admin/Video/stopRecommend',array('id'=>$video['vid']))}">取消推荐</a>|&nbsp;
							<else />
								<a href="#" ctype="ajaxmod" acturl="{:U('Admin/Video/recommend',array('id'=>$video['vid']))}">推荐</a>|&nbsp;
							</if>							
							<a ctype="drop" acturl="{:U('Admin/Video/delete',array('id'=>$video['vid']))}" href="#">删除</a>
						</td>
					</tr>						
				</volist>

				</tbody>
				<tfoot>
					<tr>
						<td colspan="5" class="pagination">
							{$page}
						</td>
					</tr>
				</tfoot>
</table>
	</div>
	<div class="pagination">{$page}</div>
</div>
<include file="Index:footer" />